# The module Element, includes all the page elements (icons, links, buttons,
# text_fields, checkboxes, select lists, dialog-boxes)

module Element
    class CreateOpportunity
        #Required Fields
        def self.new_opportunity_button(n)
            return $ie.div(:class =>"buttonTD", :text => /New/, :index =>n)
        end
        def self.opportunity_name_text_field
            return $ie.text_field(:name,"OpptyCreateEditForm.Name")
        end
        def self.opportunity_account_text_field
            return $ie.text_field(:name,"OpptyCreateEditForm.Account")
        end
        def self.search_accout_image
            return $ie.image(:src,/iconSearch.gif/)
        end
        def self.close_date_text_field
            return $ie.text_field(:name,"OpptyCreateEditForm.Primary Revenue Close Date")
        end
        def self.sales_stage_select_list
            return $ie.select_list(:name,"OpptyCreateEditForm.Sales Stage Id")
        end
        def self.market_select_list
            return $ie.select_list(:name,"OpptyCreateEditForm.ZPick_4")
        end
        def self.submarket_select_list
            return $ie.select_list(:name,"OpptyCreateEditForm.ZPick_5")
        end
        def self.primary_org_type_select_list
            return $ie.select_list(:name,"OpptyCreateEditForm.Indexed Pick 2")
        end
        def self.reason_won_select_list
            return $ie.select_list(:name,"OpptyCreateEditForm.Reason Won Lost")
        end
        def self.reason_lost_select_list
            return $ie.select_list(:name,"OpptyCreateEditForm.Indexed Pick 0")
        end

        #Controllers
        def self.save_button(n)
            return $ie.div(:class => "buttonTD",:text => /Save/,:index=>n)
        end
        def self.save_and_new_button(n)
            return $ie.div(:class =>"buttonTD",:text=>/Save & New Opportunity/,:index=>n)
        end
        def self.cancel_button(n)
            return $ie.div(:class => "buttonTD",:text=>/Cancel/,:index=>n)
        end
    end
    
end